cmake_minimum_required(VERSION 2.8)
SET(EXE_NAME MetabolicNetworkNavigator)

include_directories(
	${INCLUDE_DIR_LIB}
)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) 

find_package (Qt4 REQUIRED)
set(QT_USE_QTSQL TRUE)
set(QT_USE_QTXML TRUE)
set(QT_USE_QTNETWORK TRUE)
set(QT_USE_QTMAIN TRUE)
set(QT_USE_QTOPENGL TRUE)
set(QT_USE_QTSVG TRUE)
include( ${QT_USE_FILE} )

set(CMAKE_FIND_LIBRARY_PREFIXES lib)
find_package(Boost REQUIRED COMPONENTS date_time regex thread)
include_directories(${Boost_INCLUDE_DIRS})

#message("BOOST INCDIR: ${Boost_INCLUDE_DIRS}")
#message("BOOST LIBS:   ${Boost_LIBRARIES}")
#message("BOOST PREF:   ${CMAKE_FIND_LIBRARY_PREFIXES}")


# Generating UI's
    FILE(GLOB Forms_UIS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.ui)
    QT4_WRAP_UI(Forms_UIS_H ${Forms_UIS}) 
	
# Sources files
    FILE(GLOB Sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) 		
# Header files
    FILE(GLOB Headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) 
# Qt Resource Files	
    FILE(GLOB QRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.qrc)	
	QT4_ADD_RESOURCES(QRC_SRCS ${QRC})
	
# Windows Resource Files
    FILE(GLOB WIN_RC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rc)
	
# Qt Definitions
    ADD_DEFINITIONS(${QT_DEFINITIONS})
	
# MOC
	QT4_WRAP_CPP( MOC_Sources ${Headers} )

include(${Projects_SOURCE_DIR}/SourceGroups.cmake)	

		
# Output
    SET(ALLSRC ${Sources} ${Headers} ${MOC_Sources} ${Forms_UIS_H} ${QRC_SRCS} ${WIN_RC})
    ADD_EXECUTABLE(${EXE_NAME} WIN32 ${ALLSRC})
	
    TARGET_LINK_LIBRARIES(	${EXE_NAME}
							${QT_LIBRARIES}
							#${Boost_LIBRARIES}											
				  )

set_target_properties(${EXE_NAME} PROPERTIES DEBUG_OUTPUT_NAME ${EXE_NAME}d RELEASE_OUTPUT_NAME ${EXE_NAME})
